﻿using HelpDeskTool.Extensions;

namespace HelpDeskTool.Entities.Devices;

public class StorageDisk : Device
{
	public uint Capacity { get; init; }

	public override string ToString()
	{
		var strBuilder = new List<string>(2);

		if (Capacity > 0)
			strBuilder.Add(Capacity >= 1000 ? $"{Capacity / 1000} TB" : $"{Capacity} GB");

		if (!string.IsNullOrWhiteSpace(ModelName))
			strBuilder.Add(ModelName);

		return strBuilder.ToStringWithDelimiter();
	}
}
